package com.ktjy.service.impl;

import com.ktjy.mapper.VideoMapper;
import com.ktjy.pojo.Video;
import com.ktjy.service.VideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 黄军艳
 * @version 1.0
 * @date 2024/12/28  10:18
 */
@Service("videoService")
public class VideoServiceImpl implements VideoService {
    @Autowired
    private VideoMapper videoMapper;

    @Override
    public List<Video> selectAll(Video video) {
       return videoMapper.selectAll(video);
    }

    @Override
    public boolean insert(Video video) {
        return videoMapper.insert(video)>0;
    }

    @Override
    public boolean update(Video video) {
        return videoMapper.update(video)>0;
    }

    @Override
    public boolean delete(Long id) {
        return videoMapper.delete(id)>0;
    }

    @Override
    public Video selectById(Long id) {
        return videoMapper.selectById(id);
    }
}
